<template>
   <view class="header" :style="flag ? {paddingTop: '80rpx'} : ''">
     <text class="arrow" @tap="goBack"> 返回 </text>
     <text class="name">火龙果腐软病</text>
   </view>
   <view class="img-box">
     <image :src="resultData.isrc" mode=""></image>
   </view>
   <view class="content-box">
     <view class="row1">
       <text>别名</text>
       <text>症状</text>
       <text>防治措施</text>
     </view>
  <scroll-view scroll-y="true" class="scroll-box" >
    <view class="main-box">
      <view class="r">
        <view class="title">别名</view>
        {{resultData.name}}
      </view>
      <view class="r">
        <view class="title">
          症状
        </view>
       {{resultData.symptom}}
      </view>
      <view class="r">
        <view class="title">
          防治措施
        </view>
       {{resultData.prevent}}
      </view>
    </view>
  </scroll-view>
   </view>
</template>

<script setup>
  import {reactive} from "vue"
  import {onLoad} from '@dcloudio/uni-app';
  import {computed} from "vue"
  const flag = computed(() => {
    return getApp().globalData.isIphoneX;
  })
  const resultData = reactive({
    isrc: "",
    name: '无',
    symptom: " 主要危害火龙果肉质茎,发病初期病变部位组织会产生水渍状暗灰色(或黄褐色），并逐渐软腐，病斑后期病部组织出现软腐状。潮湿情况下,病部流出黄色菌脓,发·出腥臭，并且蔓延至整个茎节，茎肉组织会腐烂失水，最后只剩茎中心的木质部。此病多发生在植株中上部的嫩节，由伤口侵染引起，与虫咬和其它创伤有关，但对植株的危害严重。",
    prevent: " 选用对软腐病具有较强抗性的火龙果品种。培育壮苗适时定植,合理密植。雨季及时排水,尤其下水头不要积水。及时喷洒杀虫剂防治棉铃虫等蛀果害虫。剪切伤!口干后(剪后一两天)，用农用链霉素、或石硫合剂等单独进行喷雾。"
  })
    onLoad((option) => {
      resultData.isrc = option.imgsrc;
    })
const goBack = () => {
  uni.navigateBack()
} 

</script>

<style lang="scss" scoped>

  .header {
    height: 150rpx;
    text-align: center;
    line-height: 150rpx;
    background-image: linear-gradient(to bottom, #90B4F0, #BCD3F5);
    font-weight: 550;
  position: relative;
  .name{
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }
    .arrow {
      position: absolute;
      top: 50%;
      left: 30rpx;
      transform: translateY(-50%);
    }
  }

  .img-box {
    height: 430rpx;
    image {
      width: 100%;
      height: 100%;
    }
  }

  .content-box {
    .row1 {
      display: flex;
      justify-content: space-evenly;
      margin: 30rpx 0;
      font-weight: 550;
    }
    
    .scroll-box{
      height: 640rpx;
    }
    .main-box {
      padding: 0 30rpx;
      .r{
        &:not(:first-child) {
          margin-top: 30rpx;
        }
        .title{
          font-weight: 550;
        }
        
      }
    }
  }
</style>
